//
//  RemindView.m
//  dyseller
//
//  Created by 红喇叭 on 2017/8/26.
//  Copyright © 2017年 红喇叭. All rights reserved.
//

#import "RemindView.h"

@implementation RemindView

- (instancetype)initWithFrame:(CGRect)frame remindString:(NSString *)string{
    self = [super initWithFrame:frame];
    if(self){
        [self titleStr:string];
        self.backgroundColor = UIColorFromRGB(0xeeeeee);
    }
    return self;
}

- (void)titleStr:(NSString *)string{
    UIImage *image = [UIImage imageNamed:@"cartoon_icon_defalit.png"];
    UIImageView *hlb_nodata = [[UIImageView alloc] initWithImage:image];
    hlb_nodata.frame = CGRectMake(0, 0, image.size.width, image.size.height);
    hlb_nodata.center = CGPointMake(self.centerX, self.centerY);
    [self addSubview:hlb_nodata];
    
    UILabel *remind = [[UILabel alloc] initWithFrame:CGRectMake(0, hlb_nodata.bottom+10, self.width, 30)];
    remind.textAlignment = NSTextAlignmentCenter;
    remind.text = string;
    remind.font = font14;
    remind.textColor = [UIColor grayColor];
    [self addSubview:remind];
}

@end
